package com.along.game.model;

import java.math.BigDecimal;

/**
 * UserGradeId entity. @author MyEclipse Persistence Tools
 */

public class UserGrade implements java.io.Serializable {

	// Fields

	private BigDecimal id;
	private String gradeName;
	private String gradeDetail;

	// Constructors

	/** default constructor */
	public UserGrade() {
	}

	/** full constructor */
	public UserGrade(BigDecimal id, String gradeName, String gradeDetail) {
		this.id = id;
		this.gradeName = gradeName;
		this.gradeDetail = gradeDetail;
	}

	// Property accessors

	public BigDecimal getId() {
		return this.id;
	}

	public void setId(BigDecimal id) {
		this.id = id;
	}

	public String getGradeName() {
		return this.gradeName;
	}

	public void setGradeName(String gradeName) {
		this.gradeName = gradeName;
	}

	public String getGradeDetail() {
		return this.gradeDetail;
	}

	public void setGradeDetail(String gradeDetail) {
		this.gradeDetail = gradeDetail;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof UserGrade))
			return false;
		UserGrade castOther = (UserGrade) other;

		return ((this.getId() == castOther.getId()) || (this.getId() != null
				&& castOther.getId() != null && this.getId().equals(
				castOther.getId())))
				&& ((this.getGradeName() == castOther.getGradeName()) || (this
						.getGradeName() != null
						&& castOther.getGradeName() != null && this
						.getGradeName().equals(castOther.getGradeName())))
				&& ((this.getGradeDetail() == castOther.getGradeDetail()) || (this
						.getGradeDetail() != null
						&& castOther.getGradeDetail() != null && this
						.getGradeDetail().equals(castOther.getGradeDetail())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + (getId() == null ? 0 : this.getId().hashCode());
		result = 37 * result
				+ (getGradeName() == null ? 0 : this.getGradeName().hashCode());
		result = 37
				* result
				+ (getGradeDetail() == null ? 0 : this.getGradeDetail()
						.hashCode());
		return result;
	}

}